#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

int main()
{
  int n, I = 0;
  for(scanf("%d", &n); n > 0; --n)
  {
    int m, k;
    scanf("%d%d", &m, &k);
    vector<int> areas(3*m);
    for(int i = 0; i < m; ++i)
    {
      cin >> areas[i];
      areas[m + i] = areas[i]*2;
      areas[2*m + i] = areas[i]*3;
    }
    sort(areas.begin(), areas.end());
    int fields = 3*m - 1;
    vector<bool> dp(areas[fields - 1]*k + 1, false);
    vector<int> reach(1, 0);
    int count = 1;
    for(int i = 0; i < k; ++i)
    {
      vector<int> newReach;
      for(int j = 0; j < reach.size(); ++j)
        for(int s = 0; s < fields; ++s)
          if(!dp[reach[j] + areas[s]])
          {
            dp[reach[j] + areas[s]] = true;
            newReach.push_back(reach[j] + areas[s]);
            ++count;
          }
      
      reach = newReach;
    }
    printf("Scenario #%d:\n", ++I);
    printf("%d\n\n", count);
  }
}
